{% extends "base.html" %}

{% block content %}
<h2>取款</h2>
<form method="POST">
    <div class="form-group">
        <label for="card_id">选择银行卡</label>
        <select class="form-control" id="card_id" name="card_id" required>
            {% for card in cards %}
            <option value="{{ card.cardID }}">{{ card.cardID }} ({{ card.savingName }}) - 余额: {{ card.balance }}</option>
            {% endfor %}
        </select>
    </div>
    <div class="form-group">
        <label for="amount">取款金额</label>
        <input type="number" step="0.01" class="form-control" id="amount" name="amount" required>
    </div>
    <div class="form-group">
        <label for="password">银行卡密码</label>
        <input type="password" class="form-control" id="password" name="password" required>
    </div>
    <button type="submit" class="btn btn-primary">确认取款</button>
</form>
{% endblock %}